
package com.rt.schedulenew.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;

import java.util.Collection;

import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.rt.schedulebase.dto.ExamExportDto;
import com.rt.schedulebase.entity.ExamExport;
import com.rt.schedulebase.mapper.ExamExportMapper;
import org.springframework.stereotype.Service;
import com.rt.schedulenew.api.IExamExportService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

@Service
public class ExamExportServiceImpl extends ServiceImpl<ExamExportMapper, ExamExport> implements IExamExportService {
    @Override
    public int updateList(ExamExportDto dto) {
        ExamExport examExport = new ExamExport();
        UpdateWrapper<ExamExport> update = new UpdateWrapper<>();
        examExport.setExportStatus(dto.getExportStatus());
        update.in("EXAM_NO", dto.getApplyNos());
        return baseMapper.update(examExport, update);
    }

    @Override
    public int update(ExamExport dto) {
        ExamExport examExport = new ExamExport();
        UpdateWrapper<ExamExport> update = new UpdateWrapper<>();
        examExport.setExportStatus(dto.getExportStatus());
        update.eq("EXAM_NO", dto.getExamNo());
        return baseMapper.update(examExport, update);
    }
}
